<?xml version="1.0" encoding="utf-8" ?>
<Biblio.DataAccess.Emprunts xmlns:typing="urn:xmd-typing" xmlns:mapping="urn:xmd-mapping">
  <!--<mapping:uses>Ouvrages.Map.xml</mapping:uses>-->
  <Bibliotheque>
	<typing:entity type="Biblio.DataAccess.Emprunts.Bibliotheque, Biblio.DataAccess.Emprunts"/>
	<mapping:entity  class="Adoor.Object.Relational.EntityTableFactory, Adoor.Object" table="Bibliotheque2"
	    update-command = "UPDATE Bibliotheque SET Nom = ? WHERE OID = ?" DistinctMode="Supported">
	    <mapping:key class="Adoor.Object.Relational.SmartKeyFactory, Adoor.Object" PrimaryKey="BibliothequeId" SqlStatement="SELECT CLASSID FROM ITCLASSES WHERE CLASSNAME='Bibliotheque'"/>
	</mapping:entity>
	<Nom>
		<typing:property type="System.String"/>
		<mapping:property/>
	</Nom>
	<ListeExemplairesAchetes>
	    <typing:reference type="Biblio.DataAccess.Emprunts.Exemplaire, Biblio.DataAccess.Emprunts" multiplicity="*"/>
	    <mapping:reference
			class="Adoor.Object.Relational.LookupTableFactory, Adoor.Object"
			source-foreign-key="BibliAchat2"
			target-foreign-key="ListeExemplairesAchetes2"
			table-name="BibliAch_ListeExe"/>
    </ListeExemplairesAchetes>
    <ListeExemplairesRendus>
		<typing:reference type="Biblio.DataAccess.Emprunts.Exemplaire, Biblio.DataAccess.Emprunts" multiplicity="*"/>
		<mapping:reference
			class="Adoor.Object.Relational.LookupTableFactory, Adoor.Object"
			source-foreign-key="BibliLocalisation2"
			target-foreign-key="ListeExemplairesRendus2"
			table-name="ListeExe_BibliLoc"/>
	</ListeExemplairesRendus>
  </Bibliotheque>
  <Adherent>
	<typing:entity type="Biblio.DataAccess.Emprunts.Adherent, Biblio.DataAccess.Emprunts"/>
	<mapping:entity  class="Adoor.Object.Relational.EntityTableFactory, Adoor.Object" table="Adherent2" DistinctMode="Supported">
		<mapping:key class="Adoor.Object.Relational.SmartKeyFactory, Adoor.Object" PrimaryKey="AdherentId" SqlStatement="SELECT CLASSID FROM ITCLASSES WHERE CLASSNAME='Adherent'"/>
	</mapping:entity>
	<Nom>
		<typing:property type="System.String"/>
		<mapping:property/>
	</Nom>
	<Prenom>
		<typing:property type="System.String"/>
		<mapping:property/>
	</Prenom>
	<Rue>
		<typing:property type="System.String"/>
		<mapping:property/>
	</Rue>
	<Ville>
		<typing:property type="System.String"/>
		<mapping:property/>
	</Ville>
	<Exclu>
		<typing:property type="System.Boolean"/>
		<mapping:property/>
	</Exclu>
	<NumeroAdherent>
		<typing:property type="System.Int32"/>
		<mapping:property/>
	</NumeroAdherent>
	<TarifReduit>
		<typing:property type="System.Boolean"/>
		<mapping:property/>
	</TarifReduit>
	<DateFinAdhesion>
		<typing:property type="System.DateTime"/>
		<mapping:property/>
	</DateFinAdhesion>
	<ListeExemplaire>
		<typing:reference type="Biblio.DataAccess.Emprunts.Exemplaire, Biblio.DataAccess.Emprunts" multiplicity="*"/>
		<mapping:reference
			class="Adoor.Object.Relational.LookupTableFactory, Adoor.Object"
			source-foreign-key="AdherentReserveur2"
			target-foreign-key="ListeExemplaire2"
			table-name="Adherent_ListeExe"/>
	</ListeExemplaire>
	<ListeEmprunt>
	    <typing:reference type="Biblio.DataAccess.Emprunts.Emprunt, Biblio.DataAccess.Emprunts" multiplicity="*"/>
	    <mapping:reference
			class="Adoor.Object.Relational.LookupTableFactory, Adoor.Object"
			source-foreign-key="Adherent2"
			target-foreign-key="ListeEmprunt2"
			table-name="ListeEmp_Adherent"/>
    </ListeEmprunt>
  </Adherent>
  <Exemplaire>
    <typing:entity type="Biblio.DataAccess.Emprunts.Exemplaire, Biblio.DataAccess.Emprunts"/>
    <mapping:entity class="Adoor.Object.Relational.EntityTableFactory, Adoor.Object" table="Exemplaire2" DistinctMode="Supported">
		<mapping:key class="Adoor.Object.Relational.SmartKeyFactory, Adoor.Object" PrimaryKey="ExemplaireId" SqlStatement="SELECT CLASSID FROM ITCLASSES WHERE CLASSNAME='Exemplaire'"/>
	</mapping:entity>
	<Numero>
		<typing:property type="System.Int32"/>
		<mapping:property/>
	</Numero>
	<DateMaxReservation>
		<typing:property type="System.DateTime"/>
		<mapping:property/>
	</DateMaxReservation>
	<DateAchat>
		<typing:property type="System.DateTime"/>
		<mapping:property/>
	</DateAchat>
	<BibliLocalisation>
	    <typing:reference type="Biblio.DataAccess.Emprunts.Bibliotheque, Biblio.DataAccess.Emprunts" multiplicity="1" parent="ListeExemplairesRendus"/>
	    <mapping:reference class="Adoor.Object.Relational.SingleInverseReferenceFactory, Adoor.Object"/>
    </BibliLocalisation>
	<BibliAchat>
		<typing:reference type="Biblio.DataAccess.Emprunts.Bibliotheque, Biblio.DataAccess.Emprunts" multiplicity="1" parent="ListeExemplairesAchetes"/>
		<mapping:reference
	        class="Adoor.Object.Relational.SingleInverseReferenceFactory, Adoor.Object"/>
    </BibliAchat>
    <AdherentReserveur>
		<typing:reference type="Biblio.DataAccess.Emprunts.Adherent, Biblio.DataAccess.Emprunts" multiplicity="1" parent="ListeExemplaire"/>
	<mapping:reference class="Adoor.Object.Relational.SingleInverseReferenceFactory, Adoor.Object"/>
    </AdherentReserveur>
    <Ouvrage>
		<typing:reference type="Biblio.DataAccess.Ouvrages.Ouvrage, Biblio.DataAccess.Ouvrages" multiplicity="1"/>
		<mapping:reference class="Adoor.Object.Relational.ForeignKeyFactory, Adoor.Object" foreign-key="Ouvrage2"/>
    </Ouvrage>
    <EmpruntCourant>
		<typing:reference type="Biblio.DataAccess.Emprunts.Emprunt, Biblio.DataAccess.Emprunts" multiplicity="1"/>
		<mapping:reference class="Adoor.Object.Relational.ForeignKeyFactory, Adoor.Object" foreign-key="EmpruntCourant2"/>
	</EmpruntCourant>
	<ListeEmpruntPasse>
		<typing:reference type="Biblio.DataAccess.Emprunts.Emprunt, Biblio.DataAccess.Emprunts" multiplicity="*"/>
		<mapping:reference
			class="Adoor.Object.Relational.LookupTableFactory, Adoor.Object"
			source-foreign-key="ExemplaireEmprunte2"
			target-foreign-key="ListeEmpruntPasse2"
			table-name="Exemplai_ListeEmp"/>
	</ListeEmpruntPasse>
  </Exemplaire>
  <Emprunt>
	<typing:entity type="Biblio.DataAccess.Emprunts.Emprunt, Biblio.DataAccess.Emprunts"/>
	<mapping:entity class="Adoor.Object.Relational.EntityTableFactory, Adoor.Object" table="Emprunt2" DistinctMode="Supported">
		<mapping:key class="Adoor.Object.Relational.SmartKeyFactory, Adoor.Object" PrimaryKey="EmpruntId" SqlStatement="SELECT CLASSID FROM ITCLASSES WHERE CLASSNAME='Emprunt'"/>
	</mapping:entity>
	<DateEmprunt>
		<typing:property type="System.DateTime"/>
		<mapping:property/>
	</DateEmprunt>
	<DateRestitution>
		<typing:property type="System.DateTime"/>
		<mapping:property/>
	</DateRestitution>
	<Restitue>
		<typing:property type="System.Boolean"/>
		<mapping:property/>
	</Restitue>
	<Adherent>
		<typing:reference type="Biblio.DataAccess.Emprunts.Adherent, Biblio.DataAccess.Emprunts" multiplicity="1" parent="ListeEmprunt"/>
		<mapping:reference class="Adoor.Object.Relational.SingleInverseReferenceFactory, Adoor.Object"/>
	</Adherent>
	<ExemplaireEmprunte>
		<typing:reference type="Biblio.DataAccess.Emprunts.Exemplaire, Biblio.DataAccess.Emprunts" multiplicity="1" parent="ListeEmpruntPasse"/>
		<mapping:reference class="Adoor.Object.Relational.SingleInverseReferenceFactory, Adoor.Object"/>
	</ExemplaireEmprunte>
	<Exemplaire>
		<typing:reference type="Biblio.DataAccess.Emprunts.Exemplaire, Biblio.DataAccess.Emprunts" multiplicity="1"/>
		<mapping:reference class="Adoor.Object.Relational.ForeignKeyFactory, Adoor.Object" foreign-key="Exemplaire2"/>
	</Exemplaire>
  </Emprunt>
</Biblio.DataAccess.Emprunts>